/**
 * 
 */
package com.antilia.infomaresme.pages;

import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.Panel;

import com.antilia.infomaresme.InfomaresmeSession;
import com.antilia.infomaresme.data.dataobjects.Language;

/**
 * @author Ernesto
 *
 */
public class IdiomaPanel extends Panel {

	private static final long serialVersionUID = 1L;

	/**
	 * @param id
	 */
	public IdiomaPanel(String id) {
		super(id);
		add(new Link<Void>("spanish") {
			
			private static final long serialVersionUID = 1L;

			@Override
			public void onClick() {
				InfomaresmeSession.getSession().setLanguage(Language.es);
			}
		});
		add(new Link<Void>("english") {
			
			private static final long serialVersionUID = 1L;

			@Override
			public void onClick() {
				InfomaresmeSession.getSession().setLanguage(Language.en);
			}
		});
		add(new Link<Void>("catalonian") {
			
			private static final long serialVersionUID = 1L;

			@Override
			public void onClick() {
				InfomaresmeSession.getSession().setLanguage(Language.cat);
			}
		});
	}
}
